package org.free21.test;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class TabHostMain extends TabActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tab_main);
        
        startActivity(new Intent(this, SplashActivity.class));
        
        TabHost tabHost = getTabHost();
        
        tabHost.addTab(tabHost.newTabSpec("Tab01")
        		.setIndicator("Reload", getResources().getDrawable(R.drawable.tab_reload))
        		.setContent(new Intent(this, TabReload.class)));

        tabHost.addTab(tabHost.newTabSpec("Tab02")
        		.setIndicator("Prev Year", getResources().getDrawable(R.drawable.tab_arrow_up))
        		.setContent(new Intent(this, TabPrevYear.class)));
        
        tabHost.addTab(tabHost.newTabSpec("Tab03")
        		.setIndicator("Next Year", getResources().getDrawable(R.drawable.tab_arrow_down))
        		.setContent(new Intent(this, TabNextYear.class)));
        
        tabHost.addTab(tabHost.newTabSpec("Tab04")
        		.setIndicator("Favorites", getResources().getDrawable(R.drawable.tab_favorites))
        		.setContent(new Intent(this, TabFavorites.class)));
        
        tabHost.addTab(tabHost.newTabSpec("Tab05")
        		.setIndicator("Settings", getResources().getDrawable(R.drawable.tab_settings))
        		.setContent(new Intent(this, TabSettings.class)));
        
        tabHost.setCurrentTab(0);
    }
}